package gameLogic;

import javax.swing.JOptionPane;

import gameGUI.GameBoard;

public class TestLogic {
	public static void main(String[] args) {
		while (true) {
			GameBoard gb = new GameBoard("WTF!!!", null);
			//
			GameController gc = new GameController(PlayerType.HUMAN,
					PlayerType.AI_MASTER);
			// gc.b.addEventHandler(gb.bue);
			// gc.p1.addEventHandler(gb.uce);
			// gc.p2.addEventHandler(gb.uce);
			gc.addGetUserMoveEventHandler(gb.uce);
			gc.addBoardUpdatedEventHandler(gb.bue);
			//
			gb.setVisible(true);
			int r = gc.startGame();
			String message;
			if (r == 111)
				message = "YOU WIN!!";
			else if (r == 222)
				message = "YOU LOSE.";
			else
				message = "DRAW.";
			JOptionPane.showMessageDialog(null, message);
			gb.setVisible(false);
			System.out.println("****End of round.****");
		}
	}
}
